const mongoose = require("mongoose");
const { studentsModel } = require("../models/studentsModel");
const { modelName } = require("../models/exercisesModel")
const collectionSchema = new mongoose.Schema({
    exerciseId:{
        type: mongoose.SchemaTypes.ObjectId,
        //关联集合的数据模型
        ref:modelName
    },
    studentId:{
        type: mongoose.SchemaTypes.ObjectId,
        //关联集合的数据模型
        ref:studentsModel
    }
})


mongoose.model('collectionsModel', collectionSchema, 'collections');
exports.collectionsModel = "collectionsModel";